home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / webmon_1 / modweb.bas < prev    next >
BASIC Source File  |  1999-08-05  |  1KB  |  54 lines

  1. Attribute VB_Name = "modWeb"
  2. Global blnSpeak As Boolean
  3. Global blnEdit As Boolean
  4. Option Explicit
  5.  
  6. Public Function CheckUrl(URL As String, FormName As Form, Optional connType As String) As Boolean
  7.     On Error GoTo e_trap
  8.     Dim strTempData As String
  9.     DoEvents
  10.     strTempData = FormName.inetWeb.OpenURL(URL)
  11.     DoEvents
  12.     If strTempData <> "" Then
  13.         CheckUrl = True
  14.     Else
  15.         CheckUrl = False
  16.     End If
  17.     Exit Function
  18. e_trap:
  19.     CheckUrl = False
  20. End Function
  21.  
  22. Public Sub refresh()
  23.     Dim count As Integer
  24.     Dim X As Integer
  25.     count = Val(LSetting("NoOfServers"))
  26.     For X = 0 To count - 1
  27.         frmMain.lblServer(X).Caption = LSetting("MName" & X)
  28.         frmMain.lblServer(X).Visible = True
  29.     Next X
  30.     count = Val(LSetting("NoOfGateWays"))
  31.     For X = 0 To count - 1
  32.         FrmGateWay.lblGateWay(X).Caption = LSetting("GateWayName" & X)
  33.         FrmGateWay.lblGateWay(X).Visible = True
  34.     
  35.     Next X
  36. End Sub
  37.  
  38. Public Function ConvertToHMS(Seconds As Long) As String
  39.     Dim strHours As String
  40.     Dim strMins As String
  41.     Dim strSec As String
  42.     strSec = (Seconds Mod 60)
  43.     strMins = (Seconds - strSec) / 60
  44.     ConvertToHMS = CStr(strMins & ":" & strSec)
  45. End Function
  46. Public Function SayThis(Text As String) As Boolean
  47. If frmPopups.mnuSpeak.Checked = True Then
  48.     SaveSetting "FastTrack", "Speech", "SayThis", Text
  49. Else
  50.     'no speaking
  51.     Exit Function
  52. End If
  53. End Function
  54.